/**
 * 文章类型
 * @type {{DESIGN: {label: string, value: number}, CASE: {label: string, value: number}}}
 */
export const ARTICLE_TYPE = {
  KNOWLEDGE: { label: "装修知识", value: 1 },
  CASE: { label: "装修案例", value: 2 },
  DIARY: { label: "装修日记", value: 3 },
};
/**
 * 是否收藏
 * @type {{YES: {label: string, value: number}, NO: {label: string, value: number}}}
 */
export const IS_BOOKMARK = {
  YES: { label: "是", value: 1 },
  NO: { label: "否", value: 0 },
};

/**
 * 是否点赞
 * @type {{YES: {label: string, value: number}, NO: {label: string, value: number}}}
 */
export const IS_LIKE = {
  YES: { label: "是", value: 1 },
  NO: { label: "否", value: 0 },
};

/**
 * 知识块儿的类型
 *
 */
// 类型 1一级标题 2二级标题 3图片 4文字
export const ARTICLE_BLOCK_TYPE = {
  topTitle: 1,
  secondTitle: 2,
  picture: 3,
  text: 4,
};

/**
 * 文章模版
 * @type {{IMAGE_TEXT: number, IMAGE_CROSS: number}}
 */
// 取消图文模版了，现在只有swiper-detail
export const ARTICLE_TEMPLATE = {
  // 1. 图文展示模版
  1: "/sub-pages/article-detail/swiper-detail",
  // 2. 图文交叉模版
  2: "/sub-pages/article-detail/swiper-detail",
  3: "/sub-pages/article-detail/swiper-detail",
};
export const articleType = {
  DECORATION: {
    type: 2,
    title: "装修案例",
  }, // 装修案例
  KNOWLEDGE: {
    type: 1,
    title: "装修知识",
  }, // 装修知识分类
  DIARY: {
    type: 3,
    title: "装修日记",
  },
};
// 装修知识、装修案例的动态标题
export const articleTypeTitleEnum = {
  [articleType.DECORATION.type]: articleType.DECORATION.title,
  [articleType.KNOWLEDGE.type]: articleType.KNOWLEDGE.title,
};
export const articleTemplateType = {
  IMAGE_TEXT: 1, // 图文
  IMAGE_TEXT_MIX: 2, // 图文混搭
  IMAGE_TEXT_EDITOR: 3, //富文本
};
/**
 * 文章状态
 * @type {{DRAFT: {label: string, value: number}, NORMAL: {label: string, value: number}, DISABLED: {label: string, value: number}}}
 */
export const ARTICLE_STATUS = {
  DRAFT: { label: "草稿", value: 0 },
  NORMAL: { label: "正常", value: 1 },
  DISABLED: { label: "禁用", value: 2 },
};

export const ARTICLE_STATUS_MAP = {
  [ARTICLE_STATUS.DRAFT.value]: "info",
  [ARTICLE_STATUS.NORMAL.value]: "primary",
  [ARTICLE_STATUS.DISABLED.value]: "danger",
};

/**
 * 举报源
 * @type {{ARTICLE: number, COMMENT: number}}
 */
export const REPORT_SOURCE = {
  ARTICLE: 1,
  COMMENT: 2,
};
